<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>人员培训信息</title>
  </head>
  <link rel="stylesheet" type="text/css" href="css/style.css">
    <script src="/inc/js/ccorrect_btn.js"></script>
  <body>
  
    <%Dlyh dlyh =(Dlyh) request.getSession().getAttribute("dlyh"); 
      if(!dlyh.getZd().getTypename().endsWith("市")&&!dlyh.getZd().getParentid().equals(745)&&!dlyh.getZd().getId().equals(745)){
    %>
     <input type="button" value="添加培训信息" 
					onClick="location='rypx.do?state=add&uid=${ryzl.id }';" title="添加培训信息">
					<%} %>
  <table class="TableTop" width="100%">
  <tbody>
  <tr>
      <td class="left"></td>
      <td class="center subject"><span style="float:right">${fn:length(rypxlist)}条数据</span>
         人员培训-${ryzl.xm}</td>
      <td class="right"></td>
   </tr>
</tbody>
</table>	
  <pg:pager url="rypx.do" index="half-full" maxPageItems="10"
			maxIndexPages="5" isOffset="<%=false%>"
			export="pageOffset,currentPageNumber=pageNumber" scope="request">
    <table class="TableBlock no-top-border" width="100%" border=1 align="center" >
       <thead>
       <tr class="title_text">
          <td align="center" class="TableData" >人员编号</td>
          <td align="center" class="TableData" >姓名</td>
          <td align="center" class="TableData" >部门</td>
          <td align="center" class="TableData" >职位</td>
          <td align="center" class="TableData" >培训日期</td>
          <td align="center" class="TableData" >培训内容</td>
          <td align="center" class="TableData" >备注</td>
          <td align="center"class="TableData" >操作</td>
       </tr>
        </thead>
     <c:forEach var ="rypx" items="${rypxlist}">
          <pg:item>
           <tr class="TableData" style="color: black">
             <td nowrap align="center">${rypx.ryzl.bh }</td>
             <td nowrap align="center">${rypx.ryzl.xm } </td>
             <td nowrap align="center">${rypx.ryzl.zdByBmbh.zdqc }</td>
             <td nowrap align="center">${rypx.ryzl.zdByZwbh.typename } </td>
             <td nowrap align="center">${rypx.pxrqString }</td>
             <td nowrap align="center"><c:if test="${fn:length(rypx.pxnr)>36}">
              <c:forEach begin="0" end ="${fn:length(rypx.pxnr)}" var="i" step="36">
               ${fn:substring(rypx.pxnr,i,(i+36)) }<br/>
              </c:forEach>
               </c:if>
               <c:if test="${fn:length(rypx.pxnr)<=36}">${rypx.pxnr }</c:if>  </td>
             <td nowrap align="center">${rypx.bz } </td>
             <td nowrap align="center">
             <%if((dlyh.getZd().getTypename().endsWith("县")||dlyh.getZd().getTypename().endsWith("区")||dlyh.getZd().getTypename().equals("武安市"))&&!dlyh.getZd().getTypename().equals("工业园区"))
             { %>
 				 <a href="rypx.do?state=delete&rypxid=${rypx.id }&uid=${rypx.ryzl.id }" onclick="return confirm('确定要删除吗？');">删除</a>/
 			<%} if((dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745))||dlyh.getZd().getId().equals(745)){%>
 				更新<%}else{ %>
 				 <a href="rypx.do?state=update&rypxid=${rypx.id }&uid=${rypx.ryzl.id }">更新</a>
 				 <%} %>
             </td>
           </tr>
            </pg:item>
        </c:forEach>
    </table>
      <pg:index>
				<center>
					<table border=0 cellpadding="5" cellspacing=0" style="font-size: 12px">
						<tr align="center" valign="top">
							<td valign="bottom"><br /></td>
							<pg:prev ifnull="true">
								<%if (pageUrl != null) {%>
                                <td align=right>
                                   
									<A HREF="<%=pageUrl%>&state=showall&uid=${ryzl.id }&pageNo=<%=pageNumber%>">上一页<br />
									</A>
								</td>
								<%} else {%>
								<td>
									上一页
								</td>
								<%}%>
							</pg:prev>
							<pg:pages>
								<%if (pageNumber == currentPageNumber) {%>
								<td>
									<font color=#A90A08><%=pageNumber%></font>
								</td>
								<%} else {%>
								<td>
									<A HREF="<%=pageUrl%>&state=showall&&uid=${ryzl.id }&pageNo=<%=pageNumber%>"> <%=pageNumber%></A>
								</td>
								<%}%>
							</pg:pages>
							<pg:next ifnull="true">
								<%if (pageUrl!= null) {%>
								<td>
									<A HREF="<%=pageUrl%>&state=showall&uid=${ryzl.id }&pageNo=<%=pageNumber%>">下一页<br /></A>
								</td>
								<%} else {%>
								<td>
									下一页
								</td>
								<%}%>
							</pg:next>
						</tr>
					</table>
				</center>
			</pg:index>

		</pg:pager>
  </body>
</html>
